<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 6.0.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/blog/images/logo.svg" color="#222">

<link rel="stylesheet" href="/blog/css/main.css">


<link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/5.13.0/css/all.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"horsenliu.gitee.io","root":"/blog/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"left","width":240,"display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":"default"},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":true,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="1. 原理1.1 主动信息收集的特点 直接与目标系统交互通信 无法避免留下访问的痕迹 使用受控的第三方电脑进行探测，使用代理或已经被控制的机器，做好被封杀的准备 扫描发送不同的探测，根据返回结果判断目标状态  1.2 发现目标主机的过程 识别存活主机，发现潜在的被攻击目标 输出一个 IP 地址列表比如 IP 地址段 IP 地址范围 使用二、三、四层进行探测发现  1.3 TCP&#x2F;IP 五">
<meta property="og:type" content="article">
<meta property="og:title" content="02_主动信息收集">
<meta property="og:url" content="http://horsenliu.gitee.io/blog/posts/5eab130c.html">
<meta property="og:site_name" content="霍森的笔记本">
<meta property="og:description" content="1. 原理1.1 主动信息收集的特点 直接与目标系统交互通信 无法避免留下访问的痕迹 使用受控的第三方电脑进行探测，使用代理或已经被控制的机器，做好被封杀的准备 扫描发送不同的探测，根据返回结果判断目标状态  1.2 发现目标主机的过程 识别存活主机，发现潜在的被攻击目标 输出一个 IP 地址列表比如 IP 地址段 IP 地址范围 使用二、三、四层进行探测发现  1.3 TCP&#x2F;IP 五">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-01-12T08:48:00.000Z">
<meta property="article:modified_time" content="2021-01-13T02:15:14.077Z">
<meta property="article:author" content="Horsen Liu">
<meta property="article:tag" content="网络安全">
<meta property="article:tag" content="Web 攻击">
<meta property="article:tag" content="Kali">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://horsenliu.gitee.io/blog/posts/5eab130c.html">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>02_主动信息收集 | 霍森的笔记本</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/blog/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">霍森的笔记本</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">记的不少 会的不多</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/blog/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/blog/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/blog/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">123</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/blog/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">36</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/blog/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">220</span></a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <a role="button" class="book-mark-link book-mark-link-fixed"></a>

  <a href="https://github.com/horsenliu" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://horsenliu.gitee.io/blog/posts/5eab130c.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/blog/images/avatar.png">
      <meta itemprop="name" content="Horsen Liu">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="霍森的笔记本">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          02_主动信息收集
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-01-12 16:48:00" itemprop="dateCreated datePublished" datetime="2021-01-12T16:48:00+08:00">2021-01-12</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" itemprop="url" rel="index"><span itemprop="name">网络安全学习笔记</span></a>
                </span>
                  ，
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/Kali-Linux-%E6%B8%97%E9%80%8F%E6%B5%8B%E8%AF%95/" itemprop="url" rel="index"><span itemprop="name">Kali Linux 渗透测试</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span><br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>3.9k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>4 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h3 id="1-原理"><a href="#1-原理" class="headerlink" title="1. 原理"></a>1. 原理</h3><h4 id="1-1-主动信息收集的特点"><a href="#1-1-主动信息收集的特点" class="headerlink" title="1.1 主动信息收集的特点"></a>1.1 主动信息收集的特点</h4><ul>
<li>直接与目标系统交互通信</li>
<li>无法避免留下访问的痕迹</li>
<li>使用受控的第三方电脑进行探测，使用代理或已经被控制的机器，做好被封杀的准备</li>
<li>扫描发送不同的探测，根据返回结果判断目标状态</li>
</ul>
<h4 id="1-2-发现目标主机的过程"><a href="#1-2-发现目标主机的过程" class="headerlink" title="1.2 发现目标主机的过程"></a>1.2 发现目标主机的过程</h4><ol>
<li>识别存活主机，发现潜在的被攻击目标</li>
<li>输出一个 IP 地址列表比如 IP 地址段 IP 地址范围</li>
<li>使用二、三、四层进行探测发现</li>
</ol>
<h4 id="1-3-TCP-x2F-IP-五层协议"><a href="#1-3-TCP-x2F-IP-五层协议" class="headerlink" title="1.3 TCP&#x2F;IP 五层协议"></a>1.3 TCP&#x2F;IP 五层协议</h4><table>
<thead>
<tr>
<th>名称</th>
<th>网络设备</th>
<th>协议</th>
</tr>
</thead>
<tbody><tr>
<td>应用层</td>
<td>应用层设备</td>
<td>HTTP Telnet FTP TFTP DNS SMTP</td>
</tr>
<tr>
<td>传输层</td>
<td>四层路由器、四层交换机</td>
<td>TCP UDP</td>
</tr>
<tr>
<td>网络层</td>
<td>路由器、三层交换机</td>
<td>IP ICMP RIP IDMP</td>
</tr>
<tr>
<td>数据链路层</td>
<td>网桥、交换机、网卡</td>
<td>ARP RARP IEEE802.3 PPP CSMA&#x2F;CD</td>
</tr>
<tr>
<td>物理层</td>
<td>中继器、集线器、双绞线</td>
<td>FE自协商 Manchester MLT-3 4A PAMS</td>
</tr>
</tbody></table>
<span id="more"></span>

<h3 id="2-基于-ping-命令的探测"><a href="#2-基于-ping-命令的探测" class="headerlink" title="2. 基于 ping 命令的探测"></a>2. 基于 ping 命令的探测</h3><h4 id="2-1-ping"><a href="#2-1-ping" class="headerlink" title="2.1 ping"></a>2.1 ping</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">root@horsen53:~<span class="comment"># ping www.baidu.com -c 1</span></span><br><span class="line">PING www.a.shifen.com (110.242.68.4) 56(84) bytes of data.</span><br><span class="line">64 bytes from 110.242.68.4 (110.242.68.4): icmp_seq=1 ttl=47 time=30.6 ms</span><br><span class="line"></span><br><span class="line">--- www.a.shifen.com ping statistics ---</span><br><span class="line">1 packets transmitted, 1 received, 0% packet loss, time 0ms</span><br><span class="line">rtt min/avg/max/mdev = 30.557/30.557/30.557/0.000 ms</span><br></pre></td></tr></table></figure>

<h4 id="2-2-traceroute"><a href="#2-2-traceroute" class="headerlink" title="2.2 traceroute"></a>2.2 traceroute</h4><p>探测从当前主机到目标主机之间经过了哪些网络设备</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">root@horsen53:~<span class="comment"># traceroute xuegod.cn</span></span><br><span class="line">traceroute to xuegod.cn (101.200.128.35), 30 hops max, 60 byte packets</span><br><span class="line"> 1  _gateway (10.21.180.1)  51.182 ms  51.039 ms  51.414 ms</span><br><span class="line"> 2  10.21.36.250 (10.21.36.250)  51.320 ms  51.219 ms  51.144 ms</span><br><span class="line"> 3  222.190.3.17 (222.190.3.17)  53.084 ms  52.989 ms  52.888 ms</span><br><span class="line"> 4  * * *</span><br><span class="line"> 5  222.190.59.65 (222.190.59.65)  52.650 ms  52.572 ms 222.190.59.61 (222.190.59.61)  52.508 ms</span><br><span class="line"> 6  202.97.97.253 (202.97.97.253)  70.559 ms 202.97.33.33 (202.97.33.33)  36.240 ms  36.070 ms</span><br><span class="line"> 7  36.110.246.134 (36.110.246.134)  39.548 ms 36.110.246.150 (36.110.246.150)  39.299 ms 36.110.246.138 (36.110.246.138)  41.839 ms</span><br><span class="line"> 8  36.110.246.65 (36.110.246.65)  39.122 ms 106.120.186.130 (106.120.186.130)  41.786 ms 106.38.196.238 (106.38.196.238)  41.669 ms</span><br><span class="line"> 9  106.38.196.210 (106.38.196.210)  41.644 ms 45.112.216.129 (45.112.216.129)  41.512 ms 106.38.196.226 (106.38.196.226)  41.485 ms</span><br><span class="line">10  45.112.216.125 (45.112.216.125)  41.363 ms 140.205.27.229 (140.205.27.229)  41.317 ms 116.251.117.25 (116.251.117.25)  41.271 ms</span><br></pre></td></tr></table></figure>

<h4 id="2-3-arping"><a href="#2-3-arping" class="headerlink" title="2.3 arping"></a>2.3 arping</h4><p>Address Resolution Protocol 地址解析协议，计算机通过 ARP 协议将 IP 地址转换成 MAC 地址。</p>
<p>在以太网中，数据传输的目标地址是 MAC 地址，一个主机要和另一个主机进行直接通信，<strong>必须要知道目标主机的 MAC 地址</strong>。</p>
<p>计算机使用者通常只知道目标机器 IP 信息，“地址解析” 就是主机在发送帧前将目标 IP 地址转换成目标 MAC 地址的过程。</p>
<p>简单地说，ARP 协议主要负责将局域网中的 32 位 IP 地址转换为对应的 48 位物理地址，即网卡的 MAC 地址，保障通信顺利。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">root@horsen53:~<span class="comment"># arping 10.21.180.1 -c 1</span></span><br><span class="line">ARPING 10.21.180.1</span><br><span class="line">60 bytes from f4:e5:f2:25:4d:71 (10.21.180.1): index=0 time=7.753 msec</span><br><span class="line"></span><br><span class="line">--- 10.21.180.1 statistics ---</span><br><span class="line">1 packets transmitted, 1 packets received,   0% unanswered (0 extra)</span><br><span class="line">rtt min/avg/max/std-dev = 7.753/7.753/7.753/0.000 ms</span><br></pre></td></tr></table></figure>

<h4 id="2-4-Netdiscover"><a href="#2-4-Netdiscover" class="headerlink" title="2.4 Netdiscover"></a>2.4 Netdiscover</h4><p>Netdiscover 是一个主动&#x2F;被动的 ARP 侦查工具。使用Netdiscover 工具可以在网络上扫描 IP 地址，检查在线主机或搜索为它们发送的 ARP 请求。</p>
<p><strong>主动模式</strong></p>
<p>主动的探测发现网络内主机，但是这种方式往往会引起网络管理员的注意</p>
<p>参数：<code>-i device: your network device</code><br><code>-r range: scan a given range instead of auto scan. 192.168.6.0/24,/16,/8</code></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">root@horsen53:~<span class="comment"># netdiscover -i eth0 -r 10.21.183.0/24</span></span><br><span class="line"></span><br><span class="line">Currently scanning: Finished!   |   Screen View: Unique Hosts</span><br><span class="line"></span><br><span class="line">1 Captured ARP Req/Rep packets, from 1 hosts.   Total size: 60</span><br><span class="line"></span><br><span class="line">_____________________________________________________________________________</span><br><span class="line">  IP            At MAC Address     Count     Len  MAC Vendor / Hostname      </span><br><span class="line">-----------------------------------------------------------------------------</span><br><span class="line">10.21.180.1     f4:e5:f2:25:4d:71      1      60  Unknown vendor   </span><br></pre></td></tr></table></figure>

<p><strong>被动模式</strong></p>
<p>被动模式的方法更加隐蔽，但是速度会比较慢，网卡被设置为混杂模式来侦听网络内的 arp 数据包进<br>行被动式探测，这种方式就需要网络内设备发送 arp 包才能被探测到。</p>
<p>参数：<code>-p passive mode: do not send anything, only sniff</code></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">root@horsen53:~<span class="comment"># netdiscover -p</span></span><br><span class="line"></span><br><span class="line">Currently scanning: (passive)   |   Screen View: Unique Hosts</span><br><span class="line"> </span><br><span class="line"> 3 Captured ARP Req/Rep packets, from 2 hosts.   Total size: 180</span><br><span class="line"> </span><br><span class="line"> _____________________________________________________________________________</span><br><span class="line">   IP            At MAC Address     Count     Len  MAC Vendor / Hostname      </span><br><span class="line"> -----------------------------------------------------------------------------</span><br><span class="line"> 10.21.183.74    04:33:c2:00:25:a3      2     120  Unknown vendor                                                              </span><br><span class="line"> 10.21.180.1     f4:e5:f2:25:4d:71      1      60  Unknown vendor   </span><br></pre></td></tr></table></figure>

<h4 id="2-5-hping3"><a href="#2-5-hping3" class="headerlink" title="2.5 hping3"></a>2.5 hping3</h4><p>hping3 是一个命令行下使用的 TCP&#x2F;IP 数据包组装&#x2F;分析工具，通常 Web 服务会用来做压力测试使用，也可以进行 DOS 攻击的实验。同样 hping 只能每次扫描一个目标。</p>
<p>试试我的博客地址<code>horsenliu.gitee.io</code></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">root@horsen53:~<span class="comment"># hping3 -c 1000 -d 120 -S -w 64 -p 80 --flood --rand-source horsenliu.gitee.io</span></span><br><span class="line">HPING horsenliu.gitee.io (eth0 212.64.62.183): S <span class="built_in">set</span>, 40 headers + 120 data bytes</span><br><span class="line">hping <span class="keyword">in</span> flood mode, no replies will be shown</span><br><span class="line">^C</span><br><span class="line">--- horsenliu.gitee.io hping statistic ---</span><br><span class="line">2447289 packets transmitted, 0 packets received, 100% packet loss</span><br><span class="line">round-trip min/avg/max = 0.0/0.0/0.0 ms</span><br></pre></td></tr></table></figure>

<p>-c 1000  发送的数据包的数量<br>-d 120  发送到目标机器的每个数据包的大小。单位是字节<br>-S  只发送 SYN 数据包<br>-w 64 TCP 窗口大小<br>-p 80  目的地端口（80 是 Web 端口）<br>–flood 尽可能快地发送数据包，不需要考虑显示入站回复，洪水攻击模式<br>–rand-source 使用随机性的源头 IP 地址。这里的伪造的 IP 地址，只是在局域中伪造。通过路由器后，还会还原成真实的 IP 地址。</p>
<p>好了，现在我的博客已经打不开了。</p>
<h3 id="3-基于-Nmap-的扫描方式"><a href="#3-基于-Nmap-的扫描方式" class="headerlink" title="3. 基于 Nmap 的扫描方式"></a>3. 基于 Nmap 的扫描方式</h3><h3 id="4-使用-scapy-定制数据包进行高级扫描"><a href="#4-使用-scapy-定制数据包进行高级扫描" class="headerlink" title="4. 使用 scapy 定制数据包进行高级扫描"></a>4. 使用 scapy 定制数据包进行高级扫描</h3><h3 id="5-僵尸扫描"><a href="#5-僵尸扫描" class="headerlink" title="5. 僵尸扫描"></a>5. 僵尸扫描</h3>
    </div>

    
    
    
        

<div>
<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>Horsen Liu
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="http://horsenliu.gitee.io/blog/posts/5eab130c.html" title="02_主动信息收集">http://horsenliu.gitee.io/blog/posts/5eab130c.html</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="noopener" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>


      <footer class="post-footer">
          
          <div class="post-tags">
              <a href="/blog/tags/%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8/" rel="tag"><i class="fa fa-tag"></i> 网络安全</a>
              <a href="/blog/tags/Web-%E6%94%BB%E5%87%BB/" rel="tag"><i class="fa fa-tag"></i> Web 攻击</a>
              <a href="/blog/tags/Kali/" rel="tag"><i class="fa fa-tag"></i> Kali</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/blog/posts/7dcd5f5f.html" rel="prev" title="01_被动信息收集">
      <i class="fa fa-chevron-left"></i> 01_被动信息收集
    </a></div>
      <div class="post-nav-item">
    <a href="/blog/posts/f8d03568.html" rel="next" title="20-21-1 学期总结">
      20-21-1 学期总结 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-%E5%8E%9F%E7%90%86"><span class="nav-text">1. 原理</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-1-%E4%B8%BB%E5%8A%A8%E4%BF%A1%E6%81%AF%E6%94%B6%E9%9B%86%E7%9A%84%E7%89%B9%E7%82%B9"><span class="nav-text">1.1 主动信息收集的特点</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#1-2-%E5%8F%91%E7%8E%B0%E7%9B%AE%E6%A0%87%E4%B8%BB%E6%9C%BA%E7%9A%84%E8%BF%87%E7%A8%8B"><span class="nav-text">1.2 发现目标主机的过程</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#1-3-TCP-x2F-IP-%E4%BA%94%E5%B1%82%E5%8D%8F%E8%AE%AE"><span class="nav-text">1.3 TCP&#x2F;IP 五层协议</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-%E5%9F%BA%E4%BA%8E-ping-%E5%91%BD%E4%BB%A4%E7%9A%84%E6%8E%A2%E6%B5%8B"><span class="nav-text">2. 基于 ping 命令的探测</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#2-1-ping"><span class="nav-text">2.1 ping</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-2-traceroute"><span class="nav-text">2.2 traceroute</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-3-arping"><span class="nav-text">2.3 arping</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-4-Netdiscover"><span class="nav-text">2.4 Netdiscover</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-5-hping3"><span class="nav-text">2.5 hping3</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-%E5%9F%BA%E4%BA%8E-Nmap-%E7%9A%84%E6%89%AB%E6%8F%8F%E6%96%B9%E5%BC%8F"><span class="nav-text">3. 基于 Nmap 的扫描方式</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-%E4%BD%BF%E7%94%A8-scapy-%E5%AE%9A%E5%88%B6%E6%95%B0%E6%8D%AE%E5%8C%85%E8%BF%9B%E8%A1%8C%E9%AB%98%E7%BA%A7%E6%89%AB%E6%8F%8F"><span class="nav-text">4. 使用 scapy 定制数据包进行高级扫描</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5-%E5%83%B5%E5%B0%B8%E6%89%AB%E6%8F%8F"><span class="nav-text">5. 僵尸扫描</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Horsen Liu"
      src="/blog/images/avatar.png">
  <p class="site-author-name" itemprop="name">Horsen Liu</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/blog/archives/">
        
          <span class="site-state-item-count">220</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/blog/categories/">
          
        <span class="site-state-item-count">36</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/blog/tags/">
          
        <span class="site-state-item-count">123</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/horsenliu" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;horsenliu" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i></a>
      </span>
      <span class="links-of-author-item">
        <a href="https://wpa.qq.com/msgrd?v=3&uin=1468224254&site=qq&menu=yes" title="QQ → https:&#x2F;&#x2F;wpa.qq.com&#x2F;msgrd?v&#x3D;3&amp;uin&#x3D;1468224254&amp;site&#x3D;qq&amp;menu&#x3D;yes" rel="noopener" target="_blank"><i class="fab fa-qq fa-fw"></i></a>
      </span>
      <span class="links-of-author-item">
        <a href="https://sm.ms/image/jyArGeatQ9Plw4n" title="WeChat → https:&#x2F;&#x2F;sm.ms&#x2F;image&#x2F;jyArGeatQ9Plw4n" rel="noopener" target="_blank"><i class="fab fa-weixin fa-fw"></i></a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:horsenliu@qq.com" title="E-Mail → mailto:horsenliu@qq.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i></a>
      </span>
  </div>
  <div class="cc-license motion-element" itemprop="license">
    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" rel="noopener" target="_blank"><img src="/blog/images/cc-by-nc-sa.svg" alt="Creative Commons"></a>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Horsen Liu</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
      <span class="post-meta-item-text">站点总字数：</span>
    <span title="站点总字数">707k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span class="post-meta-item-text">站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">10:43</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://pisces.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> 强力驱动
  </div><script color="252,100,35" pointColor="252,100,35" opacity="1" zIndex="-1" count="150" src="https://cdn.jsdelivr.net/npm/canvas-nest.js@1/dist/canvas-nest.js"></script>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/blog/lib/anime.min.js"></script>
  <script src="/blog/lib/velocity/velocity.min.js"></script>
  <script src="/blog/lib/velocity/velocity.ui.min.js"></script>

<script src="/blog/js/utils.js"></script>

<script src="/blog/js/motion.js"></script>


<script src="/blog/js/schemes/pisces.js"></script>


<script src="/blog/js/next-boot.js"></script>

<script src="/blog/js/bookmark.js"></script>




  




  
<script src="/blog/js/local-search.js"></script>













  

  

<script src="/blog/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"scale":1,"hHeadPos":0.5,"vHeadPos":0.618,"jsonPath":"/blog/live2dw/assets/assets/hijiki.model.json"},"display":{"superSample":2,"width":180,"height":360,"position":"left","hOffset":40,"vOffset":-60},"mobile":{"show":false,"scale":0.1},"react":{"opacityDefault":0.7,"opacityOnHover":0.8},"log":false});</script></body>
</html>
